IdeaBlade DevForce 2010 Help Reference
And(IPredicateDescription[]) Method
See Also  Example Send Feedback
IdeaBlade.Linq Assembly > IdeaBlade.Linq Namespace > PredicateBuilder Class > And Method : And(IPredicateDescription[]) Method



predicateDescriptions
Returns a CompositePredicateDescription which represents a conditional AND operation.

Syntax

Visual Basic (Declaration) 
Public Overloads Shared Function And( _
   ByVal ParamArray predicateDescriptions() As IPredicateDescription _
) As CompositePredicateDescription
Visual Basic (Usage)Copy Code
Dim predicateDescriptions() As IPredicateDescription
Dim value As CompositePredicateDescription
 
value = PredicateBuilder.And(predicateDescriptions)

Parameters

predicateDescriptions

Example

C#Copy Code
public void AndQuery() {
  var mgr = new DomainModelEntityManager();

  var expr1 = new PredicateDescription(typeof(Customer), "Country", FilterOperator.IsEqualTo, "Mexico");
  var expr2 = new PredicateDescription(typeof(Customer), "CompanyName", FilterOperator.StartsWith, "A");

  // Where companyname starts with A and country = mexico
  var finalcrit = PredicateBuilder.And(expr1, expr2);
  var query = mgr.Customers.Where(finalcrit);
  var list = query.ToList();
}

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2013 All Rights Reserved.